//
//  Red_HeaderView.m
//  HappyRent
//
//  Created by CoderYee on 2017/4/7.
//  Copyright © 2017年 内圈科技. All rights reserved.
//

#import "Red_HeaderView.h"

@implementation Red_HeaderView

-(instancetype)initWithFrame:(CGRect)frame{
    
    if (self=[super initWithFrame:frame]) {
        
        [self addOwnView];
        
        [self bindViewModel];
        
    }
    
    return self;
}

-(void)addOwnView{
    
    
    _priceLable=[[UILabel alloc] init];
    _priceLable.text=@"￥899";
    _priceLable.textColor=kNavBarThemeColor;
    _priceLable.font=systemfont(16);
    _priceLable.textAlignment=NSTextAlignmentCenter;
    [self addSubview:_priceLable];
    [_priceLable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.equalTo(self);
        make.top.equalTo(self).with.offset(15);
    }];
    
    
    _postButton=[UIButton buttonWithType:UIButtonTypeCustom];
    [_postButton setTitle:@"提现" forState:UIControlStateNormal];
    _postButton.titleLabel.font=systemfont(15);
    [_postButton setTitleColor:kNavBarThemeColor forState:UIControlStateNormal];
    [self addSubview:_postButton];
    [_postButton mas_makeConstraints:^(MASConstraintMaker *make) {

        make.right.equalTo(self.mas_centerX).offset(-45);
        make.bottom.equalTo(self).with.offset(-20);
        make.height.mas_equalTo(30);
        make.width.mas_equalTo(45);
        
    }];
    
    _alipayButton=[UIButton buttonWithType:UIButtonTypeCustom];
    [_alipayButton setTitle:@"支付宝" forState:UIControlStateNormal];
    _alipayButton.titleLabel.font=systemfont(15);
    [_alipayButton setTitleColor:kNavBarThemeColor forState:UIControlStateNormal];
    [self addSubview:_alipayButton];
    [_alipayButton mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.equalTo(self.mas_centerX).offset(45);
        make.bottom.equalTo(self).with.offset(-20);
        make.height.mas_equalTo(30);
        make.width.mas_equalTo(70);
        
    }];
    
//    [_postButton setlayerCornerRadius:KCornerRadiusWidth borderwidth:KCornerBorderWidth boderColor:kGrayColor];
//    [_alipayButton setlayerCornerRadius:KCornerRadiusWidth borderwidth:KCornerBorderWidth boderColor:kGrayColor];
    
    
}
-(void)bindViewModel{
    
    
}
@end
